package com.woniu.been.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.woniu.been.entity.vo.VideoVO;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.checker.units.qual.N;
import com.woniu.been.entity.CourseChaptersRelations;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "courses") // 确保表名正确
public class Courses {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "course_id") // 明确指定列名
    private Long courseId;
    private String courseName;
    private String courseType;
    private Integer viewCount;
    private Double price;
    private String imgsrc;
    private Integer teacherId;
    private String description;
    private String lecturerInfo;
    private String highlights;
    private String createName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    private String amendName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date amendTime;
    private Integer parentCategoryId;
    private String name;
    private String categoryname;
    private String chapterNames;

    private Integer categoryId;  // 课程分类ID

    private  String courseImgsrc;

    private Integer salesCount;

    private Double salesAmount;



//
//    // 或者单独的章节对象列表
//    private List<Chapter> chapters;

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    public Integer getViewCount() {
        return viewCount;
    }

    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
